home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Utilities / vim-5.1 / doc / help.txt < prev    next >
Encoding:
Text File  |  1998-04-05  |  51.6 KB  |  1,127 lines

  1. *help.txt*    For Vim version 5.1.  Last modification: 1998 Feb 18
  2.  
  3.             VIM help file
  4.                                      k
  5.       Move around:  Use the cursor keys, or "h" to go left,           h   l
  6.             "j" to go down, "k" to go up, "l" to go right.     j
  7. Close this window:  Use ":q<Enter>".
  8.    Get out of Vim:  Use ":qa!<Enter>" (careful, all changes are lost!).
  9. Jump to a subject:  Position the cursor on a tag between |bars| and hit CTRL-].
  10.    With the mouse:  ":set mouse=a" to enable the mouse (in xterm or GUI).
  11.             Double-click the left mouse button on a tag between |bars|.
  12.      To jump back:  Type CTRL-T or CTRL-O.
  13. Get specific help:  It is possible to go directly to whatever you want help
  14.             on, by giving an argument to the ":help" command |:help|.
  15.             It is possible to further specify the context:
  16.               WHAT            PREPEND    EXAMPLE    ~
  17.               Normal mode commands     (nothing)   :help x
  18.               Visual mode commands      v_       :help v_u
  19.               Insert mode commands      i_       :help i_<Esc>
  20.               command-line commands      :       :help :quit
  21.               command-line editing      c_       :help c_<Del>
  22.               Vim command arguments      -       :help -r
  23.               options              '       :help 'textwidth'
  24.  
  25. VIM stands for Vi IMproved.  Most of VIM was made by Bram Moolenaar, but only
  26. through the help of a lot of people.  See |credits|.
  27.  
  28. |quickref|    quick reference of most commands
  29. |howto.txt|    how to do the most common things
  30. |tutor|        30 minutes training course for beginners
  31. |copying|    About copying Vim and Uganda
  32. |www|        Vim on the World Wide Web
  33. |bugs|        Where to send bug reports
  34. ------------------------------------------------------------------------------
  35. list of documentation files:                *doc-file-list*
  36.  
  37. |intro.txt|    introduction to Vim
  38. |help.txt|    overview and quick reference (this file)
  39. |index.txt|    alphabetical index for each mode
  40.  
  41. |autocmd.txt|    automatically executing commands on an event
  42. |change.txt|    delete and replace text
  43. |cmdline.txt|    Command line editing
  44. |digraph.txt|    list of available digraphs
  45. |editing.txt|    editing and writing files
  46. |eval.txt|    expression evaluation, conditional commands
  47. |farsi.txt|    Farsi editing
  48. |gui.txt|    Graphical User Interface
  49. |gui_w32.txt|    Win32 GUI
  50. |gui_x11.txt|    X11 GUI
  51. |insert.txt|    Insert and Replace mode
  52. |map.txt|    key mapping and abbreviations
  53. |message.txt|    (error) messages and explanations
  54. |motion.txt|    commands for moving around
  55. |options.txt|    options
  56. |pattern.txt|    regexp patterns and search commands
  57. |if_perl.txt|    Perl interface
  58. |if_python.txt|    Python interface
  59. |if_ole.txt|    OLE automation interface for Win32
  60. |quickfix.txt|    quick edit-compile-fix cycle commands
  61. |recover.txt|    recovering from a crash
  62. |repeat.txt|    repeating commands
  63. |rightleft.txt|    right-to-left editing
  64. |scroll.txt|    scrolling around
  65. |starting.txt|    starting Vim, command line arguments, initialisation
  66. |syntax.txt|    syntax highlighting
  67. |tagsearch.txt|    tags and special searches
  68. |term.txt|    terminal and mouse
  69. |tips.txt|    tips on using Vim
  70. |uganda.txt|    Vim distribution
  71. |undo.txt|    Undo and Redo
  72. |various.txt|    various commands
  73. |version4.txt|    differences between Vim version 3.0 and 4.x
  74. |version5.txt|    differences between Vim version 4.6 and 5.x
  75. |vi_diff.txt|    main differences between Vim and Vi
  76. |visual.txt|    Visual mode
  77. |windows.txt|    commands for using multiple windows and buffers
  78.  
  79. |help-tags|    all the tags you can jump to (index of tags)
  80.  
  81. remarks about specific systems:                *sys-file-list*
  82. |os_amiga.txt|  Amiga
  83. |os_archi.txt|  Archimedes
  84. |os_beos.txt|     BeOS/BeBox
  85. |os_dos.txt|     MS-DOS and MS-Windows NT/95 common items
  86. |os_mac.txt|    Macintosh
  87. |os_mint.txt|   Atari MiNT
  88. |os_msdos.txt|  MS-DOS (plain DOS and DOS box under Windows)
  89. |os_os2.txt|    OS/2
  90. |os_unix.txt|   Unix
  91. |os_win32.txt|  MS-Windows NT/95
  92. ------------------------------------------------------------------------------
  93.  tag      subject             tag      subject    ~
  94.                                  *quickref*
  95. |X_lr|    motion: Left-right        |X_re|    Repeating commands
  96. |X_ud|    motion: Up-down            |X_km|    Key mapping
  97. |X_tm|    motion: Text object        |X_ab|    Abbreviations
  98. |X_pa|    motion: Pattern searches    |X_op|    Options
  99. |X_ma|    motion: Marks            |X_ur|    Undo/Redo commands
  100. |X_vm|    motion: Various            |X_et|    External commands
  101. |X_ta|    motion: Using tags        |X_qf|    Quickfix commands
  102. |X_sc|    Scrolling            |X_vc|    Various commands
  103. |X_in|    insert: Inserting text        |X_ce|    Ex: Command-line editing
  104. |X_ai|    insert: Keys            |X_ra|    Ex: Ranges
  105. |X_ss|    insert: Special keys        |X_ex|    Ex: Special characters
  106. |X_di|    insert: Digraphs        |X_ed|    Editing a file
  107. |X_si|    insert: Special inserts        |X_fl|    Using the argument list
  108. |X_de|    change: Deleting text        |X_wq|    Writing and quitting
  109. |X_cm|    change: Copying and moving    |X_st|    Starting VIM
  110. |X_ch|    change: Changing text        |X_ac|    Automatic commands
  111. |X_co|    change: Complex            |X_wi|    Multi-window functions
  112. |X_vi|    Visual mode            |X_bu|    Buffer list functions
  113. |X_to|    Text objects            |X_sy|    Syntax highlighting
  114. ------------------------------------------------------------------------------
  115. N is used to indicate an optional count that can be given before the command.
  116. ------------------------------------------------------------------------------
  117. *X_lr*        Left-right motions
  118.  
  119. |h|    N  h        left (also: CTRL-H, <BS>, or <Left> key)
  120. |l|    N  l        right (also: <Space> or <Right> key)
  121. |0|       0        to first character in the line (also: <Home> key)
  122. |^|       ^        to first non-blank character in the line
  123. |$|    N  $        to the last character in the line (N-1 lines lower)
  124.                (also: <End> key)
  125. |g0|    N  g0        to first character in screen line (differs from "0"
  126.                when lines wrap)
  127. |g^|    N  g^        to first non-blank character in screen line (differs
  128.                from "^" when lines wrap)
  129. |g$|    N  g$        to last character in screen line (differs from "$"
  130.                when lines wrap)
  131. |bar|    N  |        to column N (default: 1)
  132. |f|    N  f<char>    to the Nth occurrence of <char> to the right
  133. |F|    N  F<char>    to the Nth occurrence of <char> to the left
  134. |t|    N  t<char>    till before the Nth occurrence of <char> to the right
  135. |T|    N  T<char>    till before the Nth occurrence of <char> to the left
  136. |;|    N  ;        repeat the last "f", "F", "t", or "T" N times
  137. |,|    N  ,        repeat the last "f", "F", "t", or "T" N times in
  138.                opposite direction
  139. ------------------------------------------------------------------------------
  140. *X_ud*        Up-down motions
  141.  
  142. |k|    N  k        up N lines (also: CTRL-P and <Up>)
  143. |j|    N  j        down N lines (also: CTRL-J, CTRL-N, <NL>, and <Down>)
  144. |-|    N  -        up N lines, on the first non-blank character
  145. |+|    N  +        down N lines, on the first non-blank character (also:
  146.                CTRL-M and <CR>)
  147. |_|    N  _        down N-1 lines, on the first non-blank character
  148. |G|    N  G        goto line N (default: last line), on the first
  149.                non-blank character
  150. |gg|    N  gg        goto line N (default: first line), on the first
  151.                non-blank character
  152. |N%|    N  %        goto line N percentage down in the file.  N must be
  153.                given, otherwise it is the |%| command.
  154. |gk|    N  gk        up N screen lines (differs from "k" when line wraps)
  155. |gj|    N  gj        down N screen lines (differs from "j" when line wraps)
  156. ------------------------------------------------------------------------------
  157. *X_tm*        Text object motions
  158.  
  159. |w|    N  w        N words forward
  160. |W|    N  W        N blank-separated WORDS forward
  161. |e|    N  e        forward to the end of the Nth word
  162. |E|    N  E        forward to the end of the Nth blank-separated WORD
  163. |b|    N  b        N words backward
  164. |B|    N  B        N blank-separated WORDS backward
  165. |ge|    N  ge        backward to the end of the Nth word
  166. |gE|    N  gE        backward to the end of the Nth blank-separated WORD
  167.  
  168. |)|    N  )        N sentences forward
  169. |(|    N  (        N sentences backward
  170. |}|    N  }        N paragraphs forward
  171. |{|    N  {        N paragraphs backward
  172. |]]|    N  ]]        N sections forward, at start of section
  173. |[[|    N  [[        N sections backward, at start of section
  174. |][|    N  ][        N sections forward, at end of section
  175. |[]|    N  []        N sections backward, at end of section
  176. |[(|    N  [(        N times back to unclosed '('
  177. |[{|    N  [{        N times back to unclosed '{'
  178. |])|    N  ])        N times forward to unclosed ')'
  179. |]}|    N  ]}        N times forward to unclosed '}'
  180. |[#|    N  [#        N times back to unclosed "#if" or "#else"
  181. |]#|    N  ]#        N times forward to unclosed "#else" or "#endif"
  182. |[star|    N  [*        N times back to start of comment "/*"
  183. |]star|    N  ]*        N times forward to end of comment "*/"
  184. ------------------------------------------------------------------------------
  185. *X_pa*        Pattern searches
  186.  
  187. |/|    N  /{pattern}[/[offset]]<CR>
  188.             search forward for the Nth occurrence of {pattern}
  189. |?|    N  ?{pattern}[?[offset]]<CR>
  190.             search backward for the Nth occurrence of {pattern}
  191. |/<CR>|    N  /<CR>    repeat last search, in the forward direction
  192. |?<CR>|    N  ?<CR>    repeat last search, in the backward direction
  193. |n|    N  n        repeat last search
  194. |N|    N  N        repeat last search, in opposite direction
  195. |star|    N  *        search forward for the identifier under the cursor
  196. |#|    N  #        search backward for the identifier under the cursor
  197. |gstar|    N  g*        like "*", but also find partial matches
  198. |g#|    N  g#        like "#", but also find partial matches
  199. |gd|       gd        goto local declaration of identifier under the cursor
  200. |gD|       gD        goto global declaration of identifier under the cursor
  201.  
  202. |pattern|        Special characters in search patterns
  203.  
  204.             meaning              magic   nomagic    ~
  205.         matches any single character    .    \.
  206.                matches start of line    ^    ^
  207.                    matches <EOL>    $    $
  208.                matches start of word    \<    \<
  209.              matches end of word    \>    \>
  210.     matches a single char from the range    [a-z]    \[a-z]
  211.       matches a single char not in the range    [^a-z]    \[^a-z]
  212.           matches an identifier char    \i    \i
  213.            idem but excluding digits    \I    \I
  214.          matches a keyword character    \k    \k
  215.            idem but excluding digits    \K    \K
  216.            matches a file name character    \f    \f
  217.            idem but excluding digits    \F    \F
  218.            matches a printable character    \p    \p
  219.            idem but excluding digits    \P    \P
  220.          matches a white space character    \s    \s
  221.      matches a non-white space character    \S    \S
  222.  
  223.                    matches <Esc>    \e    \e
  224.                    matches <Tab>    \t    \t
  225.                 matches <CR>    \r    \r
  226.                 matches <BS>    \b    \b
  227.  
  228.      matches 0 or more of the preceding atom    *    \*
  229.      matches 1 or more of the preceding atom    \+    \+
  230.     matches 0 or 1 of the preceding atom    \=    \=
  231.               separates two branches    \|    \|
  232.         group a pattern into an atom    \(\)    \(\)
  233.  
  234. |search-offset|        Offsets allowed after search command
  235.  
  236.     [num]    [num] lines downwards, in column 1
  237.     +[num]    [num] lines downwards, in column 1
  238.     -[num]    [num] lines upwards, in column 1
  239.     e[+num]    [num] characters to the right of the end of the match
  240.     e[-num]    [num] characters to the left of the end of the match
  241.     s[+num]    [num] characters to the right of the start of the match
  242.     s[-num]    [num] characters to the left of the start of the match
  243.     b[+num]    [num] characters to the right of the start (begin) of the match
  244.     b[-num]    [num] characters to the left of the start (begin) of the match
  245.     ;{search command}    execute {search command} next
  246. ------------------------------------------------------------------------------
  247. *X_ma*        Marks and motions
  248.  
  249. |m|       m<a-zA-Z>    mark current position with mark <a-zA-Z>
  250. |`a|       `<a-z>    go to mark <a-z> within current file
  251. |`A|       `<A-Z>    go to mark <A-Z> in any file
  252. |`0|       `<0-9>    go to the position where Vim was last exited
  253. |``|       ``        go to the position before the last jump
  254. |`quote|   `"        go to the position when last editing this file
  255. |`[|       `[        go to the start of the previously operated or put text
  256. |`]|       `]        go to the end of the previously operated or put text
  257. |`<|       `<        go to the start of the (previous) Visual area
  258. |`>|       `>        go to the end of the (previous) Visual area
  259. |'|       '<a-zA-Z0-9[]'"<>>
  260.             same as `, but on the first non-blank in the line
  261. |:marks|  :marks    print the active marks
  262. |CTRL-O|  N  CTRL-O    go to Nth older position in jump list
  263. |CTRL-I|  N  CTRL-I    go to Nth newer position in jump list
  264. |:ju|      :ju[mps]    print the jump list
  265. ------------------------------------------------------------------------------
  266. *X_vm*        Various motions
  267.  
  268. |%|       %        find the next brace, bracket, comment, or "#if"/
  269.                "#else"/"#endif" in this line and go to its match
  270. |H|    N  H        go to the Nth line in the window, on the first
  271.                non-blank
  272. |M|       M        go to the middle line in the window, on the first
  273.                non-blank
  274. |L|    N  L        go to the Nth line from the bottom, on the first
  275.                non-blank
  276. ------------------------------------------------------------------------------
  277. *X_ta*        Using tags
  278.  
  279. |:ta|       :ta[g][!] {tag}    Jump to tag {tag}
  280. |:ta|       :[count]ta[g][!]    Jump to [count]'th newer tag in tag list
  281. |CTRL-]|      CTRL-]        Jump to the tag under cursor, unless changes
  282.                    have been made
  283. |CTRL-T|   N  CTRL-T        Jump back from Nth older tag in tag list
  284. |:po|       :[count]po[p][!]    Jump back from [count]'th older tag in tag list
  285. |:tags|       :tags        Print tag list
  286. |:ts|       :ts[elect][!] [tag]    List matching tags and select one to jump to
  287. |:tnext|   :[count]tn[ext][!]    Jump to [count]'th next matching tag
  288. |:tp|      :[count]tp[revious][!] Jump to [count]'th previous matching tag
  289. |:tr|       :[count]tr[ewind][!] Jump to [count]'th matching tag
  290. |:tl|       :tl[ast][!]       Jump to last matching tag
  291. ------------------------------------------------------------------------------
  292. *X_sc*        Scrolling
  293.  
  294. |CTRL-E|    N  CTRL-E    window N lines downwards (default: 1)
  295. |CTRL-D|    N  CTRL-D    window N lines Downwards (default: 1/2 window)
  296. |CTRL-F|    N  CTRL-F    window N pages Forwards (downwards)
  297. |CTRL-Y|    N  CTRL-Y    window N lines upwards (default: 1)
  298. |CTRL-U|    N  CTRL-U    window N lines Upwards (default: 1/2 window)
  299. |CTRL-B|    N  CTRL-B    window N pages Backwards (upwards)
  300. |z<CR>|           z<CR> or zt    redraw, current line at top of window
  301. |z.|           z.     or zz    redraw, current line at center of window
  302. |z-|           z-     or zb    redraw, current line at bottom of window
  303.  
  304. |zh|        N  zh        scroll screen N characters to the right
  305. |zl|        N  zl        scroll screen N characters to the left
  306. ------------------------------------------------------------------------------
  307. *X_in*        Inserting text
  308.  
  309. |a|    N  a    append text after the cursor (N times)
  310. |A|    N  A    append text at the end of the line (N times)
  311. |i|    N  i    insert text before the cursor (N times) (also: <Insert>)
  312. |I|    N  I    insert text before the first non-blank in the line (N times)
  313. |gI|    N  gI    insert text in column 1 (N times)
  314. |o|    N  o    open a new line below the current line, append text (N times)
  315. |O|    N  O    open a new line above the current line, append text (N times)
  316. ------------------------------------------------------------------------------
  317. *X_ai*        Keys in Insert mode
  318.  
  319.          char            action in Insert mode    ~
  320. |i_<Esc>|    <Esc>          end Insert mode, back to Normal mode
  321. |i_CTRL-C|    CTRL-C          like <Esc>, but do not do an abbreviation
  322. |i_CTRL-A|    CTRL-A          insert previously inserted text
  323. |i_CTRL-@|    CTRL-@          insert previously inserted text and stop
  324.                      insert
  325. |i_CTRL-R|    CTRL-R <0-9a-z%#:.-=">  insert the contents of a register
  326. |i_<NL>|    <NL> or <CR> or CTRL-M or CTRL-J
  327.                   begin new line
  328. |i_CTRL-E|    CTRL-E          insert the character from below the cursor
  329. |i_CTRL-Y|    CTRL-Y          insert the character from above the cursor
  330. |i_CTRL-V|    CTRL-V <char>..      insert character literally, or enter decimal
  331.                      byte value
  332. |i_CTRL-N|    CTRL-N          insert next match of identifier before the
  333.                      cursor
  334. |i_CTRL-P|    CTRL-P          insert previous match of identifier before
  335.                      the cursor
  336. |i_CTRL-X|    CTRL-X ...      complete the word before the cursor in
  337.                      various ways
  338. |i_<BS>|    <BS> or CTRL-H      delete the character before the cursor
  339. |i_<Del>|    <Del>          delete the character under the cursor
  340. |i_CTRL-W|    CTRL-W          delete word before the cursor
  341. |i_CTRL-U|    CTRL-U          delete all entered characters in the current
  342.                      line
  343. |i_CTRL-T|    CTRL-T          insert one shiftwidth of indent in front of
  344.                        the current line
  345. |i_CTRL-D|    CTRL-D          delete one shiftwidth of indent in front of
  346.                      the current line
  347. |i_0_CTRL-D|    0 CTRL-D      delete all indent in the current line
  348. |i_^_CTRL-D|    ^ CTRL-D      delete all indent in the current line,
  349.                      restore indent in next line
  350. |i_CTRL-K|    CTRL-K {char1} {char2}
  351.                   enter digraph (See |X_di|)
  352. |i_digraph|    {char1} <BS> {char2}
  353.                   enter digraph if 'digraph' option set
  354. ------------------------------------------------------------------------------
  355. *X_ss*        Special keys in Insert mode
  356.  
  357. |i_<Up>|    cursor keys      move cursor left/right/up/down
  358. |i_<S-Left>|    shift-left/right  one word left/right
  359. |i_<S-Up>|    shift-up/down      one screenful backward/forward
  360. |i_CTRL-O|    CTRL-O {command}  execute {command}
  361. |i_<End>|    <End>          cursor after last character in the line
  362. |i_<Home>|    <Home>          cursor to first character in the line
  363. ------------------------------------------------------------------------------
  364. *X_di*        Digraphs
  365.  
  366. |:dig|       :dig[raphs]        show current list of digraphs
  367. |:dig|       :dig[raphs] {char1}{char2} {number} ...
  368.                 add digraph(s) to the list
  369. ------------------------------------------------------------------------------
  370. *X_si*        Special inserts
  371.  
  372. |:r|       :r [file]       insert the contents of [file] below the cursor
  373. |:r!|       :r! {command}   insert the standard output of {command} below the
  374.                   cursor
  375. ------------------------------------------------------------------------------
  376. *X_de*        Deleting text
  377.  
  378. |x|    N  x        delete N characters under and after the cursor
  379. |<Del>| N  <Del>    delete N characters under and after the cursor
  380. |X|    N  X        delete N characters before the cursor
  381. |d|    N  d{motion}    delete the text that is moved over with {motion}
  382. |v_d|    {visual}d    delete the highlighted text
  383. |dd|    N  dd        delete N lines
  384. |D|    N  D        delete to the end of the line (and N-1 more lines)
  385. |J|    N  J        join N-1 lines (delete <EOL>s)
  386. |v_J|    {visual}J    join the highlighted lines
  387. |:d|    :[range]d [x]    delete [range] lines [into register x]
  388. ------------------------------------------------------------------------------
  389. *X_cm*        Copying and moving text
  390.  
  391. |quote|      "<char>    use register <char> for the next delete, yank, or put
  392. |:reg|      :reg        show the contents of all registers
  393. |:reg|      :reg {arg}    show the contents of registers mentioned in {arg}
  394. |y|      N  y{motion}    yank the text moved over with {motion} into a register
  395. |v_y|         {visual}y    yank the highlighted text into a register
  396. |yy|      N  yy        yank N lines into a register
  397. |Y|      N  Y        yank N lines into a register
  398. |p|      N  p        put a register after the cursor position (N times)
  399. |P|      N  P        put a register before the cursor position (N times)
  400. |]p|      N  ]p        like p, but adjust indent to current line
  401. |[p|      N  [p        like P, but adjust indent to current line
  402. ------------------------------------------------------------------------------
  403. *X_ch*        Changing text
  404.  
  405. |R|      N  R        enter Replace mode (repeat the entered text N times)
  406. |c|      N  c{motion}    change the text that is moved over with {motion}
  407. |v_c|         {visual}c    change the highlighted text
  408. |cc|      N  cc        change N lines
  409. |S|      N  S        change N lines
  410. |C|      N  C        change to the end of the line (and N-1 more lines)
  411. |s|      N  s        change N characters
  412. |r|      N  r<char>    replace N characters with <char>
  413.  
  414. |~|      N  ~        switch case for N characters and advance cursor
  415. |v_~|         {visual}~    switch case for highlighted text
  416. |v_u|         {visual}u    make highlighted text lowercase
  417. |v_U|         {visual}U    make highlighted text uppercase
  418. |g~|         g~{motion} switch case for the text that is moved over with
  419.                {motion}
  420. |gu|         gu{motion} make the text that is moved over with {motion}
  421.                lowercase
  422. |gU|         gU{motion} make the text that is moved over with {motion}
  423.                uppercase
  424.  
  425. |CTRL-A|  N  CTRL-A    add N to the number at or after the cursor
  426. |CTRL-X|  N  CTRL-X    subtract N from the number at or after the cursor
  427.  
  428. |<|      N  <{motion}    move the lines that are moved over with {motion} one
  429.                shiftwidth left
  430. |<<|      N  <<        move N lines one shiftwidth left
  431. |>|      N  >{motion}    move the lines that are moved over with {motion} one
  432.                shiftwidth right
  433. |>>|      N  >>        move N lines one shiftwidth right
  434. |gq|      N  gq{motion}    format the lines that are moved over with {motion} to
  435.                'textwidth' length
  436. |:ce|      :[range]ce[nter] [width]
  437.             center the lines in [range]
  438. |:le|      :[range]le[ft] [indent]
  439.             left-align the lines in [range] [with indent]
  440. |:ri|      :[range]ri[ght] [width]
  441.             right-align the lines in [range]
  442. ------------------------------------------------------------------------------
  443. *X_co*        Complex changes
  444.  
  445. |!|       N  !{motion}{command}<CR>
  446.             filter the lines that are moved over through {command}
  447. |!!|       N  !!{command}<CR>
  448.             filter N lines through {command}
  449. |v_!|          {visual}!{command}<CR>
  450.             filter the highlighted lines through {command}
  451. |:range!|  :[range]! {command}<CR>
  452.             filter [range] lines through {command}
  453. |=|       N  ={motion}
  454.             filter the lines that are moved over through "indent"
  455. |==|       N  ==    filter N lines through "indent"
  456. |v_=|          {visual}=
  457.             filter the highlighted lines through "indent"
  458. |:s|       :[range]s[ubstitute]/{pattern}/{string}/[g][c]
  459.             substitute {pattern} by {string} in [range] lines;
  460.                with [g], replace all occurrences of {pattern};
  461.                with [c], confirm each replacement
  462. |:s|       :[range]s[ubstitute] [g][c]
  463.             repeat previous ":s" with new range and options
  464. |&|          &        Repeat previous ":s" on current line without options
  465. |:ret|       :[range]ret[ab][!] [tabstop]
  466.             set 'tabstop' to new value and adjust white space
  467.                accordingly
  468. ------------------------------------------------------------------------------
  469. *X_vi*        Visual mode
  470.  
  471. |v|       v        start highlighting characters  }  move cursor and use
  472. |V|       V        start highlighting linewise    }  operator to affect
  473. |CTRL-V|   CTRL-V    start highlighting blockwise   }  highlighted text
  474. |v_o|       o        exchange cursor position with start of highlighting
  475. |gv|       gv        start highlighting on previous visual area
  476. |v_v|       v        highlight characters or stop highlighting
  477. |v_V|       V        highlight linewise or stop highlighting
  478. |v_CTRL-V| CTRL-V    highlight blockwise or stop highlighting
  479. ------------------------------------------------------------------------------
  480. *X_to*        Text objects (only in Visual mode or after an operator)
  481.  
  482. |v_aw|    N  aw        Select "a word"
  483. |v_iw|    N  iw        Select "inner word"
  484. |v_aW|    N  aW        Select "a WORD"
  485. |v_iW|    N  iW        Select "inner WORD"
  486. |v_as|    N  as        Select "a sentence"
  487. |v_is|    N  is        Select "inner sentence"
  488. |v_ap|    N  ap        Select "a paragraph"
  489. |v_ip|    N  ip        Select "inner paragraph"
  490. |v_ab|    N  ab        Select "a block" (from "[(" to "])")
  491. |v_ib|    N  ib        Select "inner block" (from "[(" to "])")
  492. |v_aB|    N  aB        Select "a Block" (from "[{" to "]}")
  493. |v_iB|    N  iB        Select "inner Block" (from "[{" to "]}")
  494. ------------------------------------------------------------------------------
  495. *X_re*        Repeating commands
  496.  
  497. |.|       N  .        repeat last change (with count replaced with N)
  498. |q|          q<a-z>    record typed characters into register <a-z>
  499. |q|          q<A-Z>    record typed characters, appended to register <a-z>
  500. |q|          q        stop recording
  501. |@|       N  @<a-z>    execute the contents of register <a-z> (N times)
  502. |@@|       N  @@       repeat previous @<a-z> (N times)
  503. |:@|       :@<a-z>    execute the contents of register <a-z> as an Ex
  504.                command
  505. |:@@|       :@@        repeat previous :@<a-z>
  506. |:g|       :[range]g[lobal]/{pattern}/[cmd]
  507.             Execute Ex command [cmd] (default: ":p") on the lines
  508.                within [range] where {pattern} matches.
  509. |:g|       :[range]g[lobal]!/{pattern}/[cmd]
  510.             Execute Ex command [cmd] (default: ":p") on the lines
  511.                within [range] where {pattern} does NOT match.
  512. |:so|       :so[urce] {file}
  513.             Read Ex commands from {file}.
  514. |:so|       :so[urce]! {file}
  515.             Read Vim commands from {file}.
  516. |:sl|       :sl[eep] [N]
  517.             don't do anything for N seconds
  518. |gs|       N  gs    Goto Sleep for N seconds
  519. ------------------------------------------------------------------------------
  520. *X_km*        Key mapping
  521.  
  522. |:map|         :ma[p] {lhs} {rhs}      Map {lhs} to {rhs} in Normal and Visual
  523.                      mode.
  524. |:map!|         :ma[p]! {lhs} {rhs}  Map {lhs} to {rhs} in Insert and Command-line
  525.                      mode.
  526. |:noremap|   :no[remap][!] {lhs} {rhs}
  527.                   Same as ":map", no remapping for this {rhs}
  528. |:unmap|     :unm[ap] {lhs}      Remove the mapping of {lhs} for Normal and
  529.                      Visual mode.
  530. |:unmap!|    :unm[ap]! {lhs}      Remove the mapping of {lhs} for Insert and
  531.                      Command-line mode.
  532. |:map_l|     :ma[p] [lhs]      List mappings (starting with [lhs]) for
  533.                      Normal and Visual mode.
  534. |:map_l!|    :ma[p]! [lhs]      List mappings (starting with [lhs]) for
  535.                      Insert and Command-line mode.
  536. |:cmap|         :cmap/:cunmap/:cnoremap
  537.                   like ":map!"/":unmap!"/":noremap!" but for
  538.                      Command-line mode only
  539. |:imap|         :imap/:iunmap/:inoremap
  540.                   like ":map!"/":unmap!"/":noremap!" but for
  541.                      Insert mode only
  542. |:nmap|         :nmap/:nunmap/:nnoremap
  543.                   like ":map"/":unmap"/":noremap" but for
  544.                      Normal mode only
  545. |:vmap|         :vmap/:vunmap/:vnoremap
  546.                   like ":map"/":unmap"/":noremap" but for
  547.                      Visual mode only
  548. |:omap|         :omap/:ounmap/:onoremap
  549.                   like ":map"/":unmap"/":noremap" but only for
  550.                      when an operator is pending
  551. |:mkexrc|    :mk[exrc][!] [file]  write current mappings, abbreviations, and
  552.                      settings to [file] (default: ".exrc";
  553.                      use ! to overwrite)
  554. |:mkvimrc|   :mkv[imrc][!] [file]
  555.                   same as ":mkexrc", but with default ".vimrc"
  556. |:mapc|      :mapc[lear]      remove mappings for Normal and Visual mode
  557. |:mapc|      :mapc[lear]!      remove mappings for Insert and Cmdline mode
  558. |:imapc|     :imapc[lear]      remove mappings for Insert mode
  559. |:vmapc|     :vmapc[lear]      remove mappings for Visual mode
  560. |:omapc|     :omapc[lear]      remove mappings for Operator-pending mode
  561. |:nmapc|     :nmapc[lear]      remove mappings for Normal mode
  562. |:cmapc|     :cmapc[lear]      remove mappings for Cmdline mode
  563. ------------------------------------------------------------------------------
  564. *X_ab*        Abbreviations
  565.  
  566. |:abbreviate|    :ab[breviate] {lhs} {rhs}  add abbreviation for {lhs} to {rhs}
  567. |:abbreviate|    :ab[breviate] {lhs}       show abbr's that start with {lhs}
  568. |:abbreviate|    :ab[breviate]           show all abbreviations
  569. |:unabbreviate|    :una[bbreviate] {lhs}       remove abbreviation for {lhs}
  570. |:noreabbrev|    :norea[bbrev] [lhs] [rhs]  like ":ab", but don't remap [rhs]
  571. |:iabbrev|    :iab/:iunab/:inoreab       like ":ab", but only for Insert mode
  572. |:cabbrev|    :cab/:cunab/:cnoreab       like ":ab", but only for
  573.                         Command-line mode
  574. |:abclear|    :abc[lear]           remove all abbreviations
  575. |:cabclear|    :cabc[lear]           remove all abbr's for Cmdline mode
  576. |:iabclear|    :iabc[lear]           remove all abbr's for Insert mode
  577. ------------------------------------------------------------------------------
  578. *X_op*        Options
  579.  
  580. |:set|    :se[t]            Show all modified options.
  581. |:set|    :se[t] all        Show all options.
  582. |:set|    :se[t] {option}        Set toggle option on, show string or number
  583.                    option.
  584. |:set|    :se[t] no{option}    Set toggle option off.
  585. |:set|    :se[t] inv{option}    invert toggle option.
  586. |:set|    :se[t] {option}={value} Set string or number option to {value}.
  587. |:set|    :se[t] {option}?    Show value of {option}.
  588. |:set|    :se[t] {option}&    Reset {option} to its default value.
  589.  
  590. |:fix|    :fix[del]        Set value of 't_kD' according to value of
  591.                    't_kb'.
  592.  
  593. Short explanation of each option:        *option-list*
  594. |'aleph'|       |'al'|    ASCII code of the letter Aleph (Hebrew)
  595. |'altkeymap'|       |'akm'|    for default second laguage (Farsi/Hebrew)
  596. |'autoindent'|       |'ai'|    take indent for new line from previous line
  597. |'autowrite'|       |'aw'|    automatically write file if changed
  598. |'background'|       |'bg'|    "dark" or "light", used for highlight colors
  599. |'backspace'|       |'bs'|    how backspace works at start of line
  600. |'backup'|       |'bk'|    keep backup file after overwriting a file
  601. |'backupdir'|       |'bdir'|    list of directories for the backup file
  602. |'backupext'|       |'bex'|    extension used for the backup file
  603. |'binary'|       |'bin'|    edit binary file mode
  604. |'bioskey'|       |'biosk'|    MS-DOS: use bios calls for input characters
  605. |'breakat'|       |'brk'|    characters that may cause a line break
  606. |'cindent'|       |'cin'|    do C program indenting
  607. |'cinkeys'|       |'cink'|    keys that trigger indent when 'cindent' is set
  608. |'cinoptions'|       |'cino'|    how to do indenting when 'cindent' is set
  609. |'cinwords'|       |'cinw'|    words where 'si' and 'cin' add an indent
  610. |'cmdheight'|       |'ch'|    number of lines to use for the command-line
  611. |'columns'|       |'co'|    number of columns in the display
  612. |'comments'|       |'com'|    patterns that can start a comment line
  613. |'compatible'|       |'cp'|    behave Vi-compatible as much as possible
  614. |'complete'|       |'cpt'|    specify how Insert mode completion works
  615. |'cpoptions'|       |'cpo'|    flags for Vi-compatible behaviour
  616. |'define'|       |'def'|    pattern to be used to find a macro definition
  617. |'dictionary'|       |'dict'|    list of file names used for keyword completion
  618. |'digraph'|       |'dg'|    enable the entering of digraphs in Insert mode
  619. |'directory'|       |'dir'|    list of directory names for the swap file
  620. |'edcompatible'|   |'ed'|    toggle flags of ":substitute" command
  621. |'endofline'|       |'eol'|    write <EOL> for last line in file
  622. |'equalalways'|    |'ea'|    windows are automatically made the same size
  623. |'equalprg'|       |'ep'|    external program to use for "=" command
  624. |'errorbells'|       |'eb'|    ring the bell for error messages
  625. |'errorfile'|       |'ef'|    name of the errorfile for the QuickFix mode
  626. |'errorformat'|    |'efm'|    description of the lines in the error file
  627. |'esckeys'|       |'ek'|    recognize function keys in Insert mode
  628. |'eventignore'|       |'ei'|    autocommand events that are ignored
  629. |'expandtab'|       |'et'|    use spaces when <Tab> is inserted
  630. |'exrc'|       |'ex'|    read .vimrc and .exrc in the current directory
  631. |'fileformat'|       |'ff'|    file format used for file I/O
  632. |'fileformats'|       |'ffs'|    automatically detected values for 'fileformat'
  633. |'fkmap'|       |'fk'|    Farsi keyboard mapping
  634. |'formatoptions'|  |'fo'|    how automatic formatting is to be done
  635. |'formatprg'|       |'fp'|    name of external program used with "gq" command
  636. |'gdefault'|       |'gd'|    the ":substitute" flag 'g' is default on
  637. |'guicursor'|       |'gcr'|    GUI: settings for cursor shape and blinking
  638. |'guifont'|       |'gfn'|    GUI: Name(s) of font(s) to be used
  639. |'guioptions'|       |'go'|    GUI: Which components and options are used
  640. |'guipty'|            GUI: try to use a pseudo-tty for ":!" commands
  641. |'helpfile'|       |'hf'|    name of this help file
  642. |'helpheight'|       |'hh'|    minimum height of a new help window
  643. |'hidden'|       |'hid'|    don't unload buffer when it is abandoned
  644. |'highlight'|       |'hl'|    sets highlighting mode for various occasions
  645. |'hlsearch'|       |'hls'|    highlight matches with last search pattern
  646. |'history'|       |'hi'|    number of command-lines that are remembered
  647. |'hkmap'|       |'hk'|    Hebrew keyboard mapping
  648. |'icon'|            set icon of the window to the name of the file
  649. |'iconstring'|            string to use for the Vim icon
  650. |'ignorecase'|       |'ic'|    ignore case in search patterns
  651. |'include'|       |'inc'|    pattern to be used to find an include file
  652. |'incsearch'|       |'is'|    highlight match while typing search pattern
  653. |'infercase'|       |'inf'|    adjust case of match for keyword completion
  654. |'insertmode'|       |'im'|    start the edit of a file in Insert mode
  655. |'isfname'|       |'isf'|    characters included in file names and pathnames
  656. |'isident'|       |'isi'|    characters included in identifiers
  657. |'isprint'|       |'isp'|    printable characters
  658. |'iskeyword'|       |'isk'|    characters included in keywords
  659. |'joinspaces'|       |'js'|    two spaces after a period with a join command
  660. |'keywordprg'|       |'kp'|    program to use for the "K" command
  661. |'langmap'|       |'lmap'|    alphabetic characters for other language mode
  662. |'laststatus'|       |'ls'|    tells when last window has status lines
  663. |'lazyredraw'|       |'lz'|    don't redraw while executing macros
  664. |'linebreak'|       |'lbr'|    wrap long lines at a blank
  665. |'lines'|            number of lines in the display
  666. |'lisp'|            automatic indenting for Lisp
  667. |'list'|            show <Tab> and <EOL>
  668. |'magic'|            changes special characters in search patterns
  669. |'makeef'|       |'mef'|    name of the errorfile for ":make"
  670. |'makeprg'|       |'mp'|    program to use for the ":make" command
  671. |'matchtime'|       |'mat'|    tenths of a second to show matching paren
  672. |'maxmapdepth'|    |'mmd'|    maximum recursive depth for mapping
  673. |'maxmem'|       |'mm'|    maximum memory (in Kbyte) used for one buffer
  674. |'maxmemtot'|       |'mmt'|    maximum memory (in Kbyte) used for all buffers
  675. |'modeline'|       |'ml'|    recognize modelines at start or end of file
  676. |'modelines'|       |'mls'|    number of lines checked for modelines
  677. |'modified'|       |'mod'|    buffer has been modified
  678. |'more'|            pause listings when the whole screen is filled
  679. |'mouse'|            enable the use of mouse clicks
  680. |'mousehide'|       |'mh'|    hide mouse pointer while typing
  681. |'mousetime'|       |'mouset'|    max time between mouse double-click
  682. |'nrformats'|       |'nf'|    number formats recognized for CTRL-A command
  683. |'number'|       |'nu'|    print the line number in front of each line
  684. |'paragraphs'|       |'para'|    nroff macros that separate paragraphs
  685. |'paste'|            allow pasting text
  686. |'patchmode'|       |'pm'|    keep the oldest version of a file
  687. |'path'|       |'pa'|    list of directories searched with "gf" et.al.
  688. |'readonly'|       |'ro'|    disallow writing the buffer
  689. |'remap'|            allow mappings to work recursively
  690. |'report'|            threshold for reporting nr. of lines changed
  691. |'restorescreen'|  |'rs'|    Win32: restore screen when exiting
  692. |'revins'|       |'ri'|    inserting characters will work backwards
  693. |'rightleft'|       |'rl'|    window is right-to-left oriented
  694. |'ruler'|       |'ru'|    show cursor line and column in the status line
  695. |'scroll'|       |'scr'|    lines to scroll with CTRL-U and CTRL-D
  696. |'scrolljump'|       |'sj'|    minimum number of lines to scroll
  697. |'scrolloff'|       |'so'|    minimum nr. of lines above and below cursor
  698. |'sections'|       |'sect'|    nroff macros that separate sections
  699. |'secure'|            secure mode for reading .vimrc in current dir
  700. |'shell'|       |'sh'|    name of shell to use for external commands
  701. |'shellcmdflag'|   |'shcf'|    flag to shell to execute one command
  702. |'shellpipe'|       |'sp'|    string to put output of ":make" in error file
  703. |'shellquote'|       |'shq'|    quote character(s) for around shell command
  704. |'shellredir'|       |'srr'|    string to put output of filter in a temp file
  705. |'shelltype'|       |'st'|    Amiga: influences how to use a shell
  706. |'shellxquote'|       |'sxq'|    like 'shellquote', but include redirection
  707. |'shiftround'|       |'sr'|    round indent to multiple of shiftwidth
  708. |'shiftwidth'|       |'sw'|    number of spaces to use for (auto)indent step
  709. |'shortmess'|       |'shm'|    list of flags, reduce length of messages
  710. |'shortname'|       |'sn'|    non-MS-DOS: Filenames assumed to be 8.3 chars
  711. |'showbreak'|       |'sbr'|    string to use at the start of wrapped lines
  712. |'showcmd'|       |'sc'|    show (partial) command in status line
  713. |'showmatch'|       |'sm'|    briefly jump to matching bracket if insert one
  714. |'showmode'|       |'smd'|    message on status line to show current mode
  715. |'sidescroll'|       |'ss'|    minimum number of columns to scroll horizontal
  716. |'smartcase'|       |'scs'|    no ignore case when pattern has uppercase
  717. |'smartindent'|    |'si'|    smart autoindenting for C programs
  718. |'smarttab'|       |'sta'|    use 'shiftwidth' when inserting <Tab>
  719. |'softtabstop'|       |'sts'|    number of spaces that <Tab> uses while editing
  720. |'splitbelow'|       |'sb'|    new window from split is below the current one
  721. |'startofline'|    |'sol'|    commands move cursor to first blank in line
  722. |'suffixes'|       |'su'|    suffixes that are ignored with multiple match
  723. |'swapsync'|       |'sws'|    how to sync the swap file
  724. |'tabstop'|       |'ts'|    number of spaces that <Tab> in file uses
  725. |'taglength'|       |'tl'|    number of significant characters for a tag
  726. |'tagrelative'|    |'tr'|    file names in tag file are relative
  727. |'tags'|       |'tag'|    list of file names used by the tag command
  728. |'term'|            name of the terminal
  729. |'terse'|            shorten some messages
  730. |'textauto'|       |'ta'|    obsolete, use 'fileformats'
  731. |'textmode'|       |'tx'|    obsolete, use 'fileformat'
  732. |'textwidth'|       |'tw'|    maximum width of text that is being inserted
  733. |'tildeop'|       |'top'|    tilde command "~" behaves like an operator
  734. |'timeout'|       |'to'|    time out on mappings and key codes
  735. |'ttimeout'|            time out on mappings
  736. |'timeoutlen'|       |'tm'|    time out time in milliseconds
  737. |'ttimeoutlen'|       |'ttm'|    time out time for key codes in milliseconds
  738. |'title'|            set title of window to the name of the file
  739. |'titlestring'|            title to use for the Vim window
  740. |'ttybuiltin'|       |'tbi'|    use built-in termcap before external termcap
  741. |'ttyfast'|       |'tf'|    indicates a fast terminal connection
  742. |'ttyscroll'|       |'tsl'|    maximum number of lines for a scroll
  743. |'ttytype'|       |'tty'|    alias for 'term'
  744. |'undolevels'|       |'ul'|    maximum number of changes that can be undone
  745. |'updatecount'|    |'uc'|    after this many characters flush swap file
  746. |'updatetime'|       |'ut'|    after this many milliseconds flush swap file
  747. |'verbose'|       |'vbs'|    give informative messages
  748. |'viminfo'|       |'vi'|    use .viminfo file upon startup and exiting
  749. |'visualbell'|       |'vb'|    use visual bell instead of beeping
  750. |'warn'|            warn for shell command when buffer was changed
  751. |'weirdinvert'|    |'wi'|    for terminals that have weird inversion method
  752. |'whichwrap'|       |'ww'|    allow specified keys to cross line boundaries
  753. |'wildchar'|       |'wc'|    command-line character for wildcard expansion
  754. |'winheight'|       |'wh'|    minimum number of lines for the current window
  755. |'wrap'|            long lines wrap and continue on the next line
  756. |'wrapmargin'|       |'wm'|    chars from the right where wrapping starts
  757. |'wrapscan'|       |'ws'|    searches wrap around the end of the file
  758. |'writeany'|       |'wa'|    write to file with no need for "!" override
  759. |'writebackup'|    |'wb'|    make a backup before overwriting a file
  760. |'writedelay'|       |'wd'|    delay this many msec for each char (for debug)
  761. ------------------------------------------------------------------------------
  762. *X_ur*        Undo/Redo commands
  763.  
  764. |u|      N  u        undo last N changes
  765. |CTRL-R|  N  CTRL-R    redo last N undone changes
  766. |U|         U        restore last changed line
  767. ------------------------------------------------------------------------------
  768. *X_et*        External commands
  769.  
  770. |:shell|    :sh[ell]    start a shell
  771. |:!|        :!{command}    execute {command} with a shell
  772. |K|           K        lookup keyword under the cursor with
  773.                    'keywordprg' program (default: "man")
  774. ------------------------------------------------------------------------------
  775. *X_qf*        Quickfix commands
  776.  
  777. |:cc|        :cc [nr]    display error [nr] (default is the same again)
  778. |:cnext|    :cn        display the next error
  779. |:cprevious|    :cp        display the previous error
  780. |:clist|    :cl        list all errors
  781. |:cfile|    :cf        read errors from the file 'errorfile'
  782. |:cquit|    :cq        quit without writing and return error code (to
  783.                    the compiler)
  784. |:make|        :make [args]    start make, read errors, and jump to first
  785.                    error
  786. ------------------------------------------------------------------------------
  787. *X_vc*        Various commands
  788.  
  789. |CTRL-L|       CTRL-L    Clear and redraw the screen.
  790. |CTRL-G|       CTRL-G    show current file name (with path) and cursor
  791.                    position
  792. |ga|           ga        show ascii value of character under cursor in
  793.                    decimal, hex, and octal
  794. |g_CTRL-G|       g CTRL-G    show cursor column, line, and character
  795.                    position
  796. |CTRL-C|       CTRL-C    during searches: Interrupt the search
  797. |dos-CTRL-Break|   CTRL-Break    MS-DOS: during searches: Interrupt the search
  798. |<Del>|           <Del>    while entering a count: delete last character
  799. |:version|    :ve[rsion]    show version information
  800. |:mode|        :mode N        MS-DOS: set screen mode to N (number, C80,
  801.                    C4350, etc.)
  802. |:normal|    :norm[al][!] {commands}
  803.                 Execute Normal mode commands.
  804. |Q|        Q        switch to "Ex" mode
  805. |:redir|    :redir >{file}    redirect messages to {file}
  806. ------------------------------------------------------------------------------
  807. *X_ce*        Command-line editing
  808.  
  809. |c_<Esc>|    <Esc>           abandon command-line (if 'wildchar' is
  810.                       <Esc>, type it twice)
  811.  
  812. |c_CTRL-V|    CTRL-V {char}       insert {char} literally
  813. |c_CTRL-V|    CTRL-V {number}    enter decimal value of character (up to
  814.                       three digits)
  815. |c_CTRL-K|    CTRL-K {char1} {char2}
  816.                    enter digraph (See |X_di|)
  817. |c_CTRL-R|    CTRL-R <0-9a-z"%#:-=>
  818.                    insert the contents of a register
  819.  
  820. |c_<Left>|    <Left>/<Right>       cursor left/right
  821. |c_<S-Left>|    <S-Left>/<S-Right> cursor one word left/right
  822. |c_CTRL-B|    CTRL-B/CTRL-E       cursor to beginning/end of command-line
  823.  
  824. |c_<BS>|    <BS>           delete the character in front of the cursor
  825. |c_<Del>|    <Del>           delete the character under the cursor
  826. |c_CTRL-W|    CTRL-W           delete the word in front of the cursor
  827. |c_CTRL-U|    CTRL-U           remove all characters
  828.  
  829. |c_<Up>|    <Up>/<Down>       recall older/newer command-line that starts
  830.                       with current command
  831. |c_<S-Up>|    <S-Up>/<S-Down>       recall older/newer command-line from history
  832.  
  833.     Context-sensitive completion on the command-line:
  834.  
  835. |c_wildchar|    'wildchar'  (default: <Tab>)
  836.                 do completion on the pattern in front of the
  837.                    cursor.  If there are multiple matches,
  838.                    beep and show the first one; further
  839.                    'wildchar' will show the next ones.
  840. |c_CTRL-D|    CTRL-D        list all names that match the pattern in
  841.                    front of the cursor
  842. |c_CTRL-A|    CTRL-A        insert all names that match pattern in front
  843.                    of cursor
  844. |c_CTRL-L|    CTRL-L        insert longest common part of names that
  845.                    match pattern
  846. |c_CTRL-N|    CTRL-N        after 'wildchar' with multiple matches: go
  847.                    to next match
  848. |c_CTRL-P|    CTRL-P        after 'wildchar' with multiple matches: go
  849.                    to previous match
  850. ------------------------------------------------------------------------------
  851. *X_ra*        Ex ranges
  852.  
  853. |:range|    ,        separates two line numbers
  854. |:range|    ;        idem, set cursor to the first line number
  855.                 before interpreting the second one
  856.  
  857. |:range|    {number}    an absolute line number
  858. |:range|    .        the current line
  859. |:range|    $        the last line in the file
  860. |:range|    %        equal to 1,$ (the entire file)
  861. |:range|    *        equal to '<,'> (visual area)
  862. |:range|    't        position of mark t
  863. |:range|    /{pattern}[/]    the next line where {pattern} matches
  864. |:range|    ?{pattern}[?]    the previous line where {pattern} matches
  865.  
  866. |:range|    +[num]        add [num] to the preceding line number
  867.                    (default: 1)
  868. |:range|    -[num]        subtract [num] from the preceding line
  869.                    number (default: 1)
  870. ------------------------------------------------------------------------------
  871. *X_ex*        Special Ex characters
  872.  
  873. |:bar|        |        separates two commands (not for ":global" and ":!")
  874. |:quote|    "        begins comment
  875.  
  876. |:_%|        %        current file name (only where a file name is expected)
  877. |:_#|        #[number]    alternate file name [number] (only where a file name
  878.                is expected)
  879.     Note: The next four are typed literally; these are not special keys!
  880. |:<cword>|  <cword>    word under the cursor (only where a file name is
  881.                expected)
  882. |:<cWORD>|  <cWORD>    WORD under the cursor (only where a file name is
  883.                expected) (see |WORD|)
  884. |:<cfile>|  <cfile>    file name under the cursor (only where a file name is
  885.                expected)
  886. |:<afile>|  <afile>    file name for autocommand (only where a file name is
  887.                expected)
  888. |:<sfile>|  <sfile>    file name of a ":source"d file, within that file (only
  889.                where a file name is expected)
  890.  
  891.         After "%", "#", "<cfile>", "<sfile>" or "<afile>"
  892.         |::p|        :p        full path
  893.         |::h|        :h        head (file name removed)
  894.         |::t|        :t        tail (file name only)
  895.         |::r|        :r        root (extension removed)
  896.         |::e|        :e        extension
  897. ------------------------------------------------------------------------------
  898. *X_ed*        Editing a file
  899.  
  900. |:edit|       :e[dit]        Edit the current file, unless changes have
  901.                    been made.
  902. |:edit!|   :e[dit]!        Edit the current file always.  Discard any
  903.                    changes.
  904. |:edit_f|  :e[dit] {file}    Edit {file}, unless changes have been made.
  905. |:edit!_f| :e[dit]! {file}    Edit {file} always.  Discard any changes.
  906. |CTRL-^|   N   CTRL-^        Edit alternate file N (equivalent to ":e #N").
  907. |gf|           gf  or ]f    Edit the file whose name is under the cursor
  908. |:pwd|       :pwd            Print the current directory name.
  909. |:cd|       :cd [path]        Change the current directory to [path].
  910. |:file|       :f[ile]        Print the current file name and the cursor
  911.                    position.
  912. |:file|       :f[ile] {name}    Set the current file name to {name}.
  913. |:files|   :files        Show alternate file names.
  914. ------------------------------------------------------------------------------
  915. *X_fl*        Using the argument list            |argument-list|
  916.  
  917. |:args|       :ar[gs]        Print the argument list, with the current file
  918.                    in "[]".
  919. |:all|       :all  or :sall    Open a window for every file in the arg list.
  920. |:wn|       :wn[ext][!]        Write file and edit next file.
  921. |:wn|       :wn[ext][!] {file}    Write to {file} and edit next file, unless
  922.                    {file} exists.  With !, overwrite existing
  923.                    file.
  924. |:wN|       :wN[ext][!] [file]    Write file and edit previous file.
  925.  
  926.          in current window    in new window    ~
  927. |:argument|  :argu[ment] N      :sar[gument] N    Edit file N
  928. |:next|         :n[ext]          :sn[ext]        Edit next file
  929. |:next_f|    :n[ext] {arglist}      :sn[ext] {arglist}    define new arg list
  930.                                and edit first file
  931. |:Next|         :N[ext]          :sN[ext]        Edit previous file
  932. |:rewind|    :rew[ind][!]      :srew[ind]        Edit first file
  933. |:last|         :last          :slast        Edit last file
  934. ------------------------------------------------------------------------------
  935. *X_wq*        Writing and quitting
  936.  
  937. |:w|      :[range]w[rite][!]        Write to the current file.
  938. |:w_f|      :[range]w[rite] {file}    Write to {file}, unless it already
  939.                        exists.
  940. |:w_f|      :[range]w[rite]! {file}    Write to {file}.  Overwrite an existing
  941.                        file.
  942. |:w_a|      :[range]w[rite][!] >>        Append to the current file.
  943. |:w_a|      :[range]w[rite][!] >> {file}    Append to {file}.
  944. |:w_c|      :[range]w[rite] !{cmd}    Execute {cmd} with [range] lines as
  945.                        standard input.
  946. |:wall|      :wall[!]            write all changed buffers
  947.  
  948. |:q|      :q[uit]        Quit current buffer, unless changes have been
  949.                    made.  Exit Vim when there are no other
  950.                    non-help buffers
  951. |:q|      :q[uit]!        Quit current buffer always, discard any
  952.                    changes.  Exit Vim when there are no other
  953.                    non-help buffers
  954. |:qa|      :qall            Exit Vim, unless changes have been made.
  955. |:qa|      :qall!        Exit Vim always, discard any changes.
  956. |:cq|      :cq            Quit without writing and return error code.
  957.  
  958. |:wq|      :wq[!]        Write the current file and exit.
  959. |:wq|      :wq[!] {file}        Write to {file} and exit.
  960. |:xit|      :x[it][!] [file]    Like ":wq" but write only when changes have
  961.                    been made
  962. |ZZ|         ZZ            Same as ":x".
  963. |ZQ|         ZQ            Same as ":q!".
  964. |:xall|      :xall[!]  or :wqall[!]
  965.                 Write all changed buffers and exit
  966.  
  967. |:stop|      :st[op][!]        Suspend VIM or start new shell. If 'aw' option
  968.                    is set and [!] not given write the buffer.
  969. |CTRL-Z|     CTRL-Z        Same as ":stop!"
  970. ------------------------------------------------------------------------------
  971. *X_st*        Starting VIM
  972.  
  973. |-vim|       vim [options]        start editing with an empty buffer
  974. |-file|       vim [options] {file ..}    start editing one or more files
  975. |--|       vim [options] -        read file from stdin
  976. |-tag|       vim [options] -t {tag}    edit the file associated with {tag}
  977. |-qf|       vim [options] -q [fname]    start editing in QuickFix mode,
  978.                        display the first error
  979.  
  980.     Vim arguments:
  981.  
  982. |-gui|    -g            start GUI (also allows other options)
  983.  
  984. |-+|    +[num]            put the cursor at line [num] (default: last line)
  985. |-+c|    +{command}        execute {command} after loading the file
  986. |-+/|    +/{pat} {file ..}   put the cursor at the first occurrence of {pat}
  987. |-v|    -v            Vi mode, start ex in Normal mode
  988. |-e|    -e            Ex mode, start vim in Ex mode
  989. |-R|    -R            Read-only mode, implies -n
  990. |-b|    -b            binary mode
  991. |-l|    -l            lisp mode
  992. |-F|    -F            Farsi mode ('fkmap' and 'rightleft' are set)
  993. |-H|    -H            Hebrew mode ('hkmap' and 'rightleft' are set)
  994. |-V|    -V            Verbose, give informative messages
  995. |-C|    -C            Compatible, set the 'compatible' option
  996. |-N|    -N            Nocompatible, reset the 'compatible' option
  997. |-r|    -r            give list of swap files
  998. |-r|    -r {file ..}        recover aborted edit session
  999. |-n|    -n            do not create a swap file
  1000. |-o|    -o [N]            open N windows (default: one for each file)
  1001. |-f|    -f            GUI: foreground process, don't fork
  1002.                 Amiga: do not restart VIM to open a window (for
  1003.                 e.g., mail)
  1004. |-s|    -s {scriptin}        first read commands from the file {scriptin}
  1005. |-w|    -w {scriptout}        write typed chars to file {scriptout} (append)
  1006. |-W|    -W {scriptout}        write typed chars to file {scriptout} (overwrite)
  1007. |-T|    -T {terminal}        set terminal name
  1008. |-d|    -d {device}        Amiga: open {device} to be used as a console
  1009. |-u|    -u {vimrc}        read inits from {vimrc} instead of other inits
  1010. |-U|    -U {gvimrc}        idem, for when starting the GUI
  1011. |-i|    -i {viminfo}        read info from {viminfo} instead of other files
  1012. |---|    --            end of options, other arguments are file names
  1013. |--|    -            Read file from stdin.
  1014. ------------------------------------------------------------------------------
  1015. *X_ac*        Automatic Commands
  1016.  
  1017. |viminfo-file|    Read registers, marks, history at startup, save when exiting.
  1018.  
  1019. |:rviminfo|    :rv[iminfo] [file]    Read info from viminfo file [file]
  1020. |:rviminfo|    :rv[iminfo]! [file]    idem, overwrite exisiting info
  1021. |:wviminfo|    :wv[iminfo] [file]    Add info to viminfo file [file]
  1022. |:wviminfo|    :wv[iminfo]! [file]    Write info to viminfo file [file]
  1023.  
  1024. |modeline|    Automatic option setting when editing a file
  1025.  
  1026. |modeline|    vim:{set-arg}: ..    In the first and last lines of the
  1027.                     file (see 'ml' option), {set-arg} is
  1028.                     given as an argument to ":set"
  1029.  
  1030. |autocommand|    Automatic execution of commands on certain events.
  1031.  
  1032. |:autocmd|    :au            List all autocommands
  1033. |:autocmd|    :au {event}        List all autocommands for {event}
  1034. |:autocmd|    :au {event} {pat}    List all autocommands for {event} with
  1035.                     {pat}
  1036. |:autocmd|    :au {event} {pat} {cmd}    Enter new autocommands for {event}
  1037.                     with {pat}
  1038. |:autocmd|    :au!            Remove all autocommands
  1039. |:autocmd|    :au! {event}        Remove all autocommands for {event}
  1040. |:autocmd|    :au! * {pat}        Remove all autocommands for {pat}
  1041. |:autocmd|    :au! {event} {pat}    Remove all autocommands for {event}
  1042.                     with {pat}
  1043. |:autocmd|    :au! {event} {pat} {cmd}  Remove all autocommands for {event}
  1044.                     with {pat} and enter new one
  1045. ------------------------------------------------------------------------------
  1046. *X_wi*        Multi-window functions
  1047.  
  1048. |CTRL-W_s|    CTRL-W s  or  :split    Split window into two parts
  1049. |:split_f|    :split {file}        Split window and edit {file} in one of
  1050.                        them
  1051. |CTRL-W_]|    CTRL-W ]        Split window and jump to tag under
  1052.                        cursor
  1053. |CTRL-W_f|    CTRL-W f        Split window and edit file name under
  1054.                        the cursor
  1055. |CTRL-W_CTRL-^| CTRL-W CTRL-^        Split window and edit alternate file
  1056. |CTRL-W_n|    CTRL-W n  or  :new    Create new empty window
  1057. |CTRL-W_q|    CTRL-W q  or  :q[uit]    Quit editing and close window
  1058. |CTRL-W_c|    CTRL-W c  or  :cl[ose]    Make buffer hidden and close window
  1059. |CTRL-W_o|    CTRL-W o  or  :on[ly]    Make current window only one on the
  1060.                        screen
  1061.  
  1062. |CTRL-W_j|    CTRL-W j        Move cursor to window below
  1063. |CTRL-W_k|    CTRL-W k        Move cursor to window above
  1064. |CTRL-W_CTRL-W|    CTRL-W CTRL-W        Move cursor to window below (wrap)
  1065. |CTRL-W_W|    CTRL-W W        Move cursor to window above (wrap)
  1066. |CTRL-W_t|    CTRL-W t        Move cursor to top window
  1067. |CTRL-W_b|    CTRL-W b        Move cursor to bottom window
  1068. |CTRL-W_p|    CTRL-W p        Move cursor to previous active window
  1069.  
  1070. |CTRL-W_r|    CTRL-W r        Rotate windows downwards
  1071. |CTRL-W_R|    CTRL-W R        Rotate windows upwards
  1072. |CTRL-W_x|    CTRL-W x        Exchange current window with next one
  1073.  
  1074. |CTRL-W_=|    CTRL-W =        Make all windows equal height
  1075. |CTRL-W_-|    CTRL-W -        Decrease current window height
  1076. |CTRL-W_+|    CTRL-W +        Increase current window height
  1077. |CTRL-W__|    CTRL-W _        Set current window height (default:
  1078.                        very high)
  1079. ------------------------------------------------------------------------------
  1080. *X_bu*        Buffer list functions
  1081.  
  1082. |:buffers|    :buffers  or  :files    list all known buffer and file names
  1083.  
  1084. |:ball|        :ball      or  :sball    edit all args/buffers
  1085. |:unhide|    :unhide   or  :sunhide    edit all loaded buffers
  1086.  
  1087. |:bunload|    :bunload[!] [N]        unload buffer [N] from memory
  1088. |:bdelete|    :bdelete[!] [N]        unload buffer [N] and delete it from
  1089.                        the buffer list
  1090.  
  1091.           in current window   in new window    ~
  1092. |:buffer|     :[N]buffer [N]      :[N]sbuffer [N]     to arg/buf N
  1093. |:bnext|      :[N]bnext [N]      :[N]sbnext [N]      to Nth next arg/buf
  1094. |:bNext|      :[N]bNext [N]      :[N]sbNext [N]      to Nth previous arg/buf
  1095. |:bprevious|  :[N]bprevious [N]   :[N]sbprevious [N]  to Nth previous arg/buf
  1096. |:brewind|    :brewind          :sbrewind          to first arg/buf
  1097. |:blast|      :blast          :sblast          to last arg/buf
  1098. |:bmodified|  :[N]bmod [N]      :[N]sbmod [N]          to Nth modified buf
  1099. ------------------------------------------------------------------------------
  1100. *X_sy*        Syntax Highlighting
  1101.  
  1102. |:syn-on|    :syntax on        start using syntax highlighting
  1103. |:syn-off|    :syntax off        stop using syntax highlighting
  1104.  
  1105. |:syn-keyword|    :syntax keyword {group-name} {keyword} ..
  1106.                     add a syntax keyword item
  1107. |:syn-match|    :syntax match {group-name} {pattern} ...
  1108.                     add syntax match item
  1109. |:syn-region|    :syntax region {group-name} {pattern} ...
  1110.                     add syntax region item
  1111. |:syn-sync|    :syntax sync [ccomment | lines {N} | ...]
  1112.                     tell syntax how to sync
  1113. |:syntax|    :syntax [list]        list current syntax items
  1114. |:syn-clear|    :syntax clear        clear all syntax info
  1115.  
  1116. |:highlight|    :highlight clear    clear all highlight info
  1117. |:highlight|    :highlight {group-name} {key}={arg} ..
  1118.                     set highlighting for {group-name}
  1119. ------------------------------------------------------------------------------
  1120. *bars*        Bars example
  1121.  
  1122. Now that you've jumped here with CTRL-], <2-LeftMouse>, g<LeftMouse>, or
  1123. <C-LeftMouse>, you can use CTRL-T, CTRL-O, g<RightMouse>, or <C-RightMouse> to
  1124. go back to where you were.
  1125. ------------------------------------------------------------------------------
  1126.  vim:ts=8:sw=8:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":
  1127.